package com.dime.physical.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimeInquirycurrentdiseasesMapper;
import com.dime.physical.domain.DimeInquirycurrentdiseases;
import com.dime.physical.service.IDimeInquirycurrentdiseasesService;

/**
 * 问诊现患疾病Service业务层处理
 * 
 * @author Tiny
 * @date 2023-10-07
 */
@Service
public class DimeInquirycurrentdiseasesServiceImpl implements IDimeInquirycurrentdiseasesService 
{
    @Autowired
    private DimeInquirycurrentdiseasesMapper dimeInquirycurrentdiseasesMapper;

    /**
     * 查询问诊现患疾病
     * 
     * @param id 问诊现患疾病主键
     * @return 问诊现患疾病
     */
    @Override
    public DimeInquirycurrentdiseases selectDimeInquirycurrentdiseasesById(String id)
    {
        return dimeInquirycurrentdiseasesMapper.selectDimeInquirycurrentdiseasesById(id);
    }

    /**
     * 查询问诊现患疾病列表
     * 
     * @param dimeInquirycurrentdiseases 问诊现患疾病
     * @return 问诊现患疾病
     */
    @Override
    public List<DimeInquirycurrentdiseases> selectDimeInquirycurrentdiseasesList(DimeInquirycurrentdiseases dimeInquirycurrentdiseases)
    {
        return dimeInquirycurrentdiseasesMapper.selectDimeInquirycurrentdiseasesList(dimeInquirycurrentdiseases);
    }

    /**
     * 新增问诊现患疾病
     * 
     * @param dimeInquirycurrentdiseases 问诊现患疾病
     * @return 结果
     */
    @Override
    public int insertDimeInquirycurrentdiseases(DimeInquirycurrentdiseases dimeInquirycurrentdiseases)
    {
        dimeInquirycurrentdiseases.setCreateTime(DateUtils.getNowDate());
        return dimeInquirycurrentdiseasesMapper.insertDimeInquirycurrentdiseases(dimeInquirycurrentdiseases);
    }

    /**
     * 修改问诊现患疾病
     * 
     * @param dimeInquirycurrentdiseases 问诊现患疾病
     * @return 结果
     */
    @Override
    public int updateDimeInquirycurrentdiseases(DimeInquirycurrentdiseases dimeInquirycurrentdiseases)
    {
        dimeInquirycurrentdiseases.setUpdateTime(DateUtils.getNowDate());
        return dimeInquirycurrentdiseasesMapper.updateDimeInquirycurrentdiseases(dimeInquirycurrentdiseases);
    }

    /**
     * 批量删除问诊现患疾病
     * 
     * @param ids 需要删除的问诊现患疾病主键
     * @return 结果
     */
    @Override
    public int deleteDimeInquirycurrentdiseasesByIds(String[] ids)
    {
        return dimeInquirycurrentdiseasesMapper.deleteDimeInquirycurrentdiseasesByIds(ids);
    }

    /**
     * 删除问诊现患疾病信息
     * 
     * @param id 问诊现患疾病主键
     * @return 结果
     */
    @Override
    public int deleteDimeInquirycurrentdiseasesById(String id)
    {
        return dimeInquirycurrentdiseasesMapper.deleteDimeInquirycurrentdiseasesById(id);
    }
}
